//
//  NIBaseViewController.h
//  gweAD
//
//  Created by navinfo air on 2016/10/31.
//  Copyright © 2016年 mengy. All rights reserved.
//

#import <UIKit/UIKit.h>

#import "LocalAuthentication/LAContext.h"
#import "NIToast.h"
#import "DeviceDefine.h"
#import "NILoadingView.h"
#import "ColorDefine.h"
#import "FontDefines.h"
#import "AlertTextDefines.h"
#import "CommonHeader.h"
#import <ReactiveObjC/ReactiveObjC.h>

@interface NIBaseViewController : UIViewController
#pragma mark ------- 页面相关 -------
/**
 *  是否强制横屏。YES-强制横屏，NO-竖屏
 */
@property(nonatomic,assign)BOOL isForceLandscape;
/**
 *  修改状态栏颜色
 */
@property (nonatomic, assign) UIStatusBarStyle StatusBarStyle;
/**
 *  无数据View
 */
@property (nonatomic,strong) UIImageView* noDataView;
/**
 屏幕属性
 
 @return 屏幕宽
 */
- (CGFloat)getScreenWidth;
/**
 屏幕属性
 
 @return 屏幕高
 */
- (CGFloat)getScreenHeight;
/**
 屏幕属性
 
 @return 状态栏高度
 */
- (CGFloat)getStatusBarHeight;

#pragma mark 设置初始值（页面传值）

- (void)setValueForController;

#pragma mark 显示无数据页面

-(void)showNoDataImage;

#pragma mark 移除无数据页面

-(void)removeNoDataImage;

#pragma mark 设置为圆圈按钮

- (void)createCircleButton:(UIButton *)targetButton;

#pragma mark 设置双色Label

- (void)setValueAndUnitForLabel:(UILabel *)label valueForLabel:(NSString *)value unitForLabel:(NSString *)unit colorForValue:(UIColor *)vColor colorForUnit:(UIColor *)uColor fontForValue:(UIFont *)valueFont fontForUnit:(UIFont *)unitFont;

#pragma mark ------- NavigationBar相关 -------
#pragma mark 设置title

-(void)setTitle:(NSString *)title;

#pragma mark 返回事件，子类可重写

-(void)onClickBackButton;

#pragma mark 返回按钮图片设置

-(void)setBackBtnWithImageName:(NSString *)imageName;

#pragma mark 返回按钮图片设置,响应事件

-(void)setBackBtnWithImageName:(NSString *)imageName action:(SEL)action target:(id)target;

#pragma mark 右侧navigationBar靠右按钮设置图片

-(void)setRightBtn1WithImageName:(NSString *)imageName action:(SEL)action target:(id)target;

#pragma mark 右侧navigationBar靠左按钮设置图片

-(void)setRightBtn2WithImageName:(NSString *)imageName action:(SEL)action target:(id)target;

#pragma mark 右侧navigationBar靠右按钮设置图片，title

-(void)setRightBtn1WithTitle:(NSString *)title backgroundImageName:(NSString *)imageName action:(SEL)action target:(id)target;

#pragma mark 右侧navigationBar靠左按钮设置图片，title

-(void)setRightBtn2WithTitle:(NSString *)title backgroundImageName:(NSString *)imageName action:(SEL)action target:(id)target;

#pragma mark 隐藏按钮

-(void)hiddenRightBtn1;

-(void)hiddenRightBtn2;

-(void)setBackBtnHidden:(BOOL)hidden;

#pragma mark Enable

-(void)setRightBtn1Enable:(BOOL)enable;

-(void)setRightBtn2Enable:(BOOL)enable;
#pragma mark ------- 返回相关 -------
#pragma mark 返回上一页

- (void)back;

#pragma mark 返回到某个类

- (BOOL)backToClass:(Class)targetClass;

#pragma mark 返回到Root

- (void)backFromTop;

#pragma mark 返回到targerClass，如果没有就返回到Root

- (void)backToClassFromTop:(Class)targetClass;

- (void)pushFromDown:(UIStoryboardSegue *)segue;

#pragma mark Dealloc后如果还有PresentController，则dismiss。

- (void)viewDidBack;

#pragma mark 查找targetClass

- (UIViewController *)findViewControllerWithClass:(Class)targetClass;

#pragma mark 查找targetClass并pop

- (UIViewController *)findViewControllerAndBackWithClass:(Class)targetClass;

#pragma mark ------- 提示相关 -------

- (void)showAlert:(NSString *)title;

- (void)showToast:(NSString *)text;

- (void)showAlertWithActionTitle:(NSString *)title ActionTitle:(NSString *)aTitle;

- (void)showActionSheet:(NSArray *)array title:(NSString *)title destructiveIndex:(NSInteger)destructiveIndex actionTag:(NSInteger)tag;

- (void)showAlertWithActionTitle:(NSString *)title ActionTitle:(NSString *)aTitle cancelActionTitle:(NSString *)cancelTitle;

- (void)showAlertWithActionTitle:(NSString *)title ActionTitle:(NSString *)aTitle cancelActionTitle:(NSString *)cancelTitle tag:(NSInteger)tag;

- (void)onActionSheetSelect:(NSString *)text actionTag:(NSInteger)tag;

- (void)showActionSheet:(NSArray *)array title:(NSString *)title actionTag:(NSInteger)tag;

- (void)onCancelActionClick;

- (void)onActionClick;

- (void)showDateActionSheet:(UIDatePickerMode)mode;

- (void)closeAlertController:(void (^ )(BOOL))completion;

#pragma mark ------- 其他功能相关 -------
#pragma mark 发送短信

-(void)showMessageView : (NSString *)phone title : (NSString *)title body : (NSString *)body;



@end
